﻿<%@ Page Language="C#" MasterPageFile="~/Style/FrontEnd/FrontEnd.master" AutoEventWireup="true" CodeBehind="Details.aspx.cs" Inherits="OnlineFloralShop.Product.Details" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor"
    TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <style type="text/css">
.detailinfomation{
    margin:0px;
    padding: 0px;
}
.detailinfomation .image{
    vertical-align:top;
}
.detailinfomation .content{
    vertical-align: top;
    text-align: justify;
    padding-left: 20px;
}
.detailinfomation .content .title{
    padding-bottom: 3px; border-bottom:1px solid #F3F3F3; font-size:16px; color: #04A504;
}
.detailinfomation .content .codesp{
    padding: 3px 0px; border-bottom:1px solid #F3F3F3; font-size:12px; color: #333333; font-weight:bold;
}
.detailinfomation .content .pricesp{
    padding: 3px 0px; border-bottom:1px solid #F3F3F3; font-size:12px; color: #BB0000; font-weight:bold;
}
.detailinfomation .content .mota{
    padding: 3px 0px; border-bottom:1px solid #F3F3F3;
}

</style>
<style type="text/css">
.divclear{ clear:both; margin: 0px; padding: 0px; height: 10px; border-top: 1px #999999 dotted; }
.paginationproduct{ list-style-image: none; list-style-position: outside;
                    list-style-type: none; margin:0px; padding: 0px; }
.paginationproduct li{ float:left; background: none; padding-left:5px; font-size:10px; }
.paginationproduct li a{ font-size:10px; }
.paginationproduct li .pagingactive{ clear:both; background:#ECECEC; padding:0px 5px;
                                    border:1px solid #BFBFBF; font-size:11px; font-weight:bold; }
.paginationproduct li .paging{ clear:both;border:1px solid #BFBFBF; padding:1px 5px;}
.tool-title span{ display: none;}
.tool-title{ background: none;}
.sanphamcungloai{
    color:#04A504;font-weight:bold;font-size:13px;padding-top:5px;height:25px;
    border-top:1px solid #333333; border-bottom:1px solid #333333; background:#F3F3F3;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="contentMain" runat="server">
<!-- DETAIL PRODUCT-->
    <asp:FormView ID="FormView_Details" runat="server">
        <ItemTemplate>
                <div class="detailinfomation">
                <table width="100%" cellspacing="0" cellpadding="0">
                    <tbody><tr>
                        <td class="image">
                            <a class="modal" href=''>
                                <img runat="server" width="220" height="220" border="0" title="Hoa chúc mừng" alt="Hoa chúc mừng" src='<%# Eval("Images") %>'>            </a>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
                        <td class="content">
                            <div class="title"><%# Eval("ProductName") %></div>
                            <div class="codesp">Code: <%# Eval("ProductId") %></div>
                            <div class="pricesp">Price: <%# decimal.Floor(decimal.Parse(Eval("Price").ToString()))%> $</div>
                            <div class="codesp">Status: <%# OnlineFloralShop.Common.CommonController.StatusStore(int.Parse(Eval("Quantity").ToString())) %></div>
                            <div class="mota">
                                <div style="float: left;  font-weight:bold; color:#333333;">Description:</div>
                                <div style="float: left; padding-left:3%; "><%# Eval("Description")%></div>
                                <div style="clear:both;"></div>
                            </div>
                            <div class="mota">
                                <div style="float: left;  font-weight:bold; color:#333333;">Details:</div>
                                <div style="float: left; padding-left:3%; "><%# Eval("Details")%></p></div>
                                <div style="clear:both;"></div>
                            </div>
                             <div class="mota">
                                <div style="float: left; font-weight:bold; color:#333333;">Quantity:</div>
                                <div style="float: left; padding-left:3%; "><asp:TextBox ID="txtQuantity" Text="1" Width="40" runat="server"></asp:TextBox>&ensp;&ensp;<asp:Button CssClass="viewdetail" ID="btnAddtoCart" runat="server" Text="Add to cart" onclick="btnAddtoCart_Click" /><asp:RegularExpressionValidator
                                        ID="RegularExpressionValidator1" ControlToValidate="txtQuantity" runat="server" ErrorMessage=" *only digits" ValidationExpression="\d*"></asp:RegularExpressionValidator></div>
                                <div style="clear:both;"></div>
                            </div>
                        </td>
                    </tr>
                </tbody></table>
                </div>
        </ItemTemplate>
    </asp:FormView> 
  <!-- DETAIL PRODUCT-->
    
  <!-- WRITE COMMENTS -->

  
    <div class="bigtitle_">COMMENTS</div>
    <asp:ListView ID="ListView_Review" runat="server">
            <ItemTemplate>
                    <div class="CommentList">
                         <p><b><%# Eval("Author") %> :</b><br />
                         <%# Eval("Content") %><br />
                         <i><%# Eval("DateAdded") %></i></p>
                    </div>
            </ItemTemplate>
            <EmptyDataTemplate>
                 <div style="border:solid 1px #dedede; padding:4px; ">
                            <p>No Comment</p>
                 </div>
            </EmptyDataTemplate>
            <LayoutTemplate>
              <div ID="itemPlaceholder" runat="server" ></div>
            </LayoutTemplate>
    </asp:ListView>
    <!--PAGES-->
    <b><i>Pages:  </i></b><asp:Label ID="lbPrev" runat="server" Text=""></asp:Label><asp:Label ID="lbPaging" runat="server" Text=""></asp:Label><asp:Label ID="lbNext"
            runat="server" Text=""></asp:Label>
    <!--PAGES-->
    <br /><br />
    <asp:Accordion ID="MyAccordion" runat="server" SelectedIndex="1"
            HeaderCssClass="accordionHeader" HeaderSelectedCssClass="accordionHeaderSelected"
            ContentCssClass="accordionContent" FadeTransitions="false" FramesPerSecond="40" 
            TransitionDuration="250" AutoSize="None" RequireOpenedPane="false" SuppressHeaderPostbacks="true">
           <Panes>
            <asp:AccordionPane ID="AccordionPane1" runat="server">
                <Header><div class="bigtitle_"><a href="#" id="linkCmt" runat="server">WRITE COMMENTS</a></div></Header>
                <Content>
                    <asp:Panel ID="Panel1" runat="server" DefaultButton="btnSendcmt">
                    <div class="Comment">
                    <p><b>Author</b><br />
                    <asp:TextBox ID="txtAuthor" runat="server" Width="200"></asp:TextBox><asp:RequiredFieldValidator
                    ID="RequiredFieldValidator1" ValidationGroup="cmt" runat="server" ControlToValidate="txtAuthor" ErrorMessage="Required Author"></asp:RequiredFieldValidator></p>
                    <p><b>Email</b><br />
                    <asp:TextBox ID="txtEmail" Width="200" runat="server"></asp:TextBox><asp:RequiredFieldValidator
                    ID="RequiredFieldValidator2" ValidationGroup="cmt" runat="server" ControlToValidate="txtEmail" ErrorMessage="Required Email"></asp:RequiredFieldValidator></p>
                    <p><b>Content</b><br />
                    <asp:TextBox ID="txtContent" TextMode="MultiLine" runat="server" Height="80" Width="300"></asp:TextBox><asp:RequiredFieldValidator
                    ID="RequiredFieldValidator3" ValidationGroup="cmt" runat="server" ErrorMessage="Required Content" ControlToValidate="txtContent"></asp:RequiredFieldValidator></p>
                    <p><asp:Button ID="btnSendcmt"  ValidationGroup="cmt" CssClass="viewdetail" runat="server" Text="Send" 
                    onclick="btnSendcmt_Click" /></p>
                    <asp:Label ID="lbnotify" runat="server" Text=""></asp:Label>
                    </div>
                    </asp:Panel>
                </Content>
            </asp:AccordionPane>
    </Panes>
    </asp:Accordion>
    
    <!-- WRITE COMMENTS -->   
    
    <!-- PRODUCT RELATE --> 
     <div class="bigtitle_">YOU MAY ALSO LIKE TO BUY</div>
      <asp:ListView ID="ListView_ProductRelate" runat="server">
            <ItemTemplate>
            <div style='float:left; margin:5px; width:48%; background:#F3F3F3;'>
                <div style='margin:4px; padding:10px; border:1px solid #FFFFFF;'>
                <table width='100%' cellpadding='0' cellspacing='0'>
                  <tr>

                    <td valign='top'><div style='float:left; width:100px;'><a title='<%# Eval("ProductName") %>' href='Details.aspx?ProductId=<%# Eval("ProductId") %>' class='tips'>

                            <img id="Img1" width="100" height="100" title='<%# Eval("ProductName") %>' alt='<%# Eval("ProductName") %>' runat="server" src='<%# Eval("Images") %>' border="0" />
                        </a>
                    </div></td>
                    <td align='justify' valign='top' style='padding-left:10px; font-size:11px;'>
                        <div style='height:100px;'>
                            <b><a  title='<%# Eval("ProductName") %>'  href='Details.aspx?ProductId=<%# Eval("ProductId") %>' style='font-size:12px;'><%# Eval("ProductName") %></a></b> - <b><%# Eval("ProductId") %></b> <br />

                             <%# Eval("Description") %><br />
                            <b style='color:#BB0000; font-size:12px;'>Price: <%# decimal.Floor(decimal.Parse(Eval("Price").ToString()))%> $</b><br />
                            <b style='color:#BB0000; font-size:12px;'>Status: 
                                <asp:Label ID="Label_Status" runat="server" Text='<%# OnlineFloralShop.Common.CommonController.StatusStore(int.Parse(Eval("Quantity").ToString())) %>'></asp:Label> </b>
                        </div>
                        <div style='height:20px;'>
                            <a title='View details' class='viewdetail' href='Details.aspx?ProductId=<%# Eval("ProductId") %>' >Details</a>
                 
                            <a title='Order' class='viewdetail'  style='margin-left:5px;' href="../AddToCart.aspx?ProductId=<%# Eval("ProductId") %>" >Order</a>

                            <a title='View cart' class='viewdetail' style='margin-left:5px;' href="../Cart.aspx" >Basket</a>

                        </div>
                    </td>
                  </tr>
                </table>
               </div>
            </div>
            </ItemTemplate>
            <EmptyDataTemplate>
                 <div style="border:solid 1px #dedede; margin:20px; padding:10px" >
                            <p>No Product</p>
                 </div>
            </EmptyDataTemplate>
            <LayoutTemplate>
            
                  <div ID="itemPlaceholder" runat="server" ></div>

            </LayoutTemplate>
      
        </asp:ListView>		
    <!-- PRODUCT RELATE --> 
    

 </asp:Content>